/*
Navicat MySQL Data Transfer

Source Server         : showtao
Source Server Version : 50540
Source Host           : localhost:3306
Source Database       : showtao

Target Server Type    : MYSQL
Target Server Version : 50599
File Encoding         : 65001

Date: 2014-12-03 21:29:00
*/

SET FOREIGN_KEY_CHECKS=0;

-- ----------------------------
-- Table structure for permission
-- ----------------------------
DROP TABLE IF EXISTS `permission`;
CREATE TABLE `permission` (
`PERMISSION`  varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`DESCRIPTION`  varchar(80) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`PERMISSION`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of permission
-- ----------------------------
BEGIN;
INSERT INTO `permission` VALUES ('account:admin', 'account permission'), ('auth:admin', 'auth permission');
COMMIT;

-- ----------------------------
-- Table structure for product
-- ----------------------------
DROP TABLE IF EXISTS `product`;
CREATE TABLE `product` (
`id`  varchar(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`category`  varchar(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`name`  varchar(80) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`description`  varchar(255) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of product
-- ----------------------------
BEGIN;
INSERT INTO `product` VALUES ('aaa', 'F', 'aaa', 'aaaaa'), ('AV-CB-01', 'B', 'Amazon Parrot', 'Great companion for up to 75 years'), ('AV-SB-02', 'B', 'Finch', 'Great stress reliever'), ('FI-FW-01', 'F', 'Koi', 'Fresh Water fish from Japan'), ('FI-FW-02', 'F', 'Goldfish', 'Fresh Water fish from China'), ('FI-SW-01', 'F', 'Angelfish', 'Salt Water fish from Australia'), ('FI-SW-02', 'F', 'Tiger Shark', 'Salt Water fish from Australia'), ('FL-DLH-02', 'C', 'Persian', 'Friendly house cat, doubles as a princess'), ('FL-DSH-01', 'C', 'Manx', 'Great for reducing mouse populations'), ('K9-BD-01', 'D', 'Bulldog', 'Friendly dog from England'), ('K9-CW-01', 'D', 'Chihuahua', 'Great companion dog'), ('K9-DL-01', 'D', 'Dalmation', 'Great dog for a Fire Station'), ('K9-PO-02', 'D', 'Poodle', 'Cute dog from France'), ('K9-RT-01', 'D', 'Golden Retriever', 'Great family dog'), ('K9-RT-02', 'D', 'Labrador Retriever', 'Great hunting dog'), ('RP-LI-02', 'R', 'Iguana', 'Friendly green friend'), ('RP-SN-01', 'R', 'Rattlesnake', 'Doubles as a watch dog');
COMMIT;

-- ----------------------------
-- Table structure for role
-- ----------------------------
DROP TABLE IF EXISTS `role`;
CREATE TABLE `role` (
`ROLENAME`  varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`DESCRIPTION`  varchar(80) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`ROLENAME`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of role
-- ----------------------------
BEGIN;
INSERT INTO `role` VALUES ('admin', 'the admin role'), ('role1', 'role1');
COMMIT;

-- ----------------------------
-- Table structure for role_permission
-- ----------------------------
DROP TABLE IF EXISTS `role_permission`;
CREATE TABLE `role_permission` (
`ROLENAME`  varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '' ,
`PERMISSION`  varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
PRIMARY KEY (`ROLENAME`, `PERMISSION`),
FOREIGN KEY (`ROLENAME`) REFERENCES `role` (`ROLENAME`) ON DELETE RESTRICT ON UPDATE RESTRICT
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of role_permission
-- ----------------------------
BEGIN;
INSERT INTO `role_permission` VALUES ('admin', 'account:admin'), ('admin', 'auth:admin');
COMMIT;

-- ----------------------------
-- Table structure for st_agency
-- ----------------------------
DROP TABLE IF EXISTS `st_agency`;
CREATE TABLE `st_agency` (
`agency_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`agency_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`agency_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`agency_type`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`agency_level`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`valid_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`remark`  varchar(512) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`agency_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_agency
-- ----------------------------
BEGIN;
INSERT INTO `st_agency` VALUES ('1001', 'JM', '', null, null, null, null, null, null, null, null, null);
COMMIT;

-- ----------------------------
-- Table structure for st_agency_order
-- ----------------------------
DROP TABLE IF EXISTS `st_agency_order`;
CREATE TABLE `st_agency_order` (
`agency_order_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`agency_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`agency_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`product_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`agency_order_date`  date NULL DEFAULT NULL ,
`order_status`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`customer_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`customer_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`car_type_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`car_type_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`style_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`templet_type`  varchar(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`carbrand_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`colour`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`amount`  int(11) NULL DEFAULT NULL ,
`material_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`embroider_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`Straight_pleated`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`car_ower`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`receiver_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`receiver_phone`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`receiver_postcode`  varchar(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`receiver_address`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`remark`  varchar(512) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`batch_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`agency_order_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_agency_order
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_car_style
-- ----------------------------
DROP TABLE IF EXISTS `st_car_style`;
CREATE TABLE `st_car_style` (
`vendor_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT '9999' ,
`style_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`style_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`cutting_factor`  double(6,2) NULL DEFAULT NULL ,
`sewing_factor`  double(6,2) NULL DEFAULT NULL ,
`operate_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'O-µ¼Èë;U-ÐÞ¸Ä;I-ÐÂÔö;D-É¾³ý' ,
`style_photo_path`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`remark`  varchar(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`style_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_car_style
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_car_type
-- ----------------------------
DROP TABLE IF EXISTS `st_car_type`;
CREATE TABLE `st_car_type` (
`car_type_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`car_brand`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`product_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`car_sub_brand`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`car_type`  varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`type_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`type_diff_one`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`type_diff_two`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`type_diff_three`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`type_diff_four`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`type_diff_five`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`type_year`  varchar(4) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`walking_box_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'Y' ,
`back_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'Y' ,
`confirm_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`type_parameter`  int(8) NULL DEFAULT NULL COMMENT 'Ìá¹©ºóÐø´òÓ¡Ê¹ÓÃ' ,
`special_desc`  varchar(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`template_feature`  varchar(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'Ìá¹©ºóÐø´òÓ¡Ê¹ÓÃ' ,
`Sewing_technology`  varchar(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'Ìá¹©ºóÐø´òÓ¡Ê¹ÓÃ' ,
`car_factor`  double(6,2) NULL DEFAULT NULL ,
`quantity`  int(11) NULL DEFAULT NULL ,
`package_factor`  double(6,2) NULL DEFAULT NULL ,
`type_ext_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`Column_25`  char(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`Column_26`  char(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`remark`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`car_type_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_car_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_carbrand_tree
-- ----------------------------
DROP TABLE IF EXISTS `st_carbrand_tree`;
CREATE TABLE `st_carbrand_tree` (
`carbrand_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`carbrand_code`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`carbrand_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`carbrand_level`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`carbrand_parent_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`delete_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`url`  varchar(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_carbrand_tree
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_consumption
-- ----------------------------
DROP TABLE IF EXISTS `st_consumption`;
CREATE TABLE `st_consumption` (
`type_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`style_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`templet_type`  varchar(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`material_door`  double(6,2) NOT NULL ,
`material_mao`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`consumption_num`  double(6,2) NULL DEFAULT NULL ,
`operate_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`type_code`, `style_id`, `templet_type`, `material_door`, `material_mao`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_consumption
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_customer
-- ----------------------------
DROP TABLE IF EXISTS `st_customer`;
CREATE TABLE `st_customer` (
`customer_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`customer_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`customer_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`customer_type`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`customer_level`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`agency_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`valid_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`remark`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`customer_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_customer
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_cutting_order
-- ----------------------------
DROP TABLE IF EXISTS `st_cutting_order`;
CREATE TABLE `st_cutting_order` (
`cutting_order_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`order_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`product_brand`  char(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`agency_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`agency_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`order_date`  date NULL DEFAULT NULL ,
`order_status`  varchar(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT '0£¬1' ,
`car_type_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT '¶ÔÓ¦st_car_type ±íÖÐµÄtype_code' ,
`car_type_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`style_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`carbrand_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`colour`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`amount`  int(11) NULL DEFAULT NULL ,
`material_detail_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`material_detail_type`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`templet_type`  varchar(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`consumpte_num`  double(6,2) NULL DEFAULT NULL ,
`cutting_price`  double(16,4) NULL DEFAULT NULL ,
`remark`  varchar(512) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`batch_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`cutting_order_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_cutting_order
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_cutting_plan
-- ----------------------------
DROP TABLE IF EXISTS `st_cutting_plan`;
CREATE TABLE `st_cutting_plan` (
`row_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`cutting_date`  date NULL DEFAULT NULL ,
`cutting_order_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`cutting_order_seq`  int(11) NULL DEFAULT NULL ,
`order_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`item_no`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`item_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`day_capacity`  int(11) NULL DEFAULT NULL ,
`create_date`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`row_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_cutting_plan
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_embroider
-- ----------------------------
DROP TABLE IF EXISTS `st_embroider`;
CREATE TABLE `st_embroider` (
`embroider_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`embroider_photo`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`size`  double(6,2) NULL DEFAULT NULL ,
`needle_num`  int(11) NULL DEFAULT NULL ,
`small_cloth_num`  int(11) NULL DEFAULT NULL ,
`big_cloth_num`  int(11) NULL DEFAULT NULL ,
`vendor_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`operate_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`embroider_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_embroider
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_function_menu
-- ----------------------------
DROP TABLE IF EXISTS `st_function_menu`;
CREATE TABLE `st_function_menu` (
`row_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`function_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`function_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`valid_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`url`  varchar(512) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`role_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`group_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`row_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_function_menu
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_item_capacity
-- ----------------------------
DROP TABLE IF EXISTS `st_item_capacity`;
CREATE TABLE `st_item_capacity` (
`row_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`vendor_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`item_no`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`item_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`item_type`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`day_capacity`  int(11) NULL DEFAULT NULL ,
`create_date`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`row_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_item_capacity
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_material
-- ----------------------------
DROP TABLE IF EXISTS `st_material`;
CREATE TABLE `st_material` (
`material_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`product_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`product_colour`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`sewing_factor`  double(6,2) NULL DEFAULT NULL ,
`package_factor`  double(6,2) NULL DEFAULT NULL ,
`vendor_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`operate_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'O-µ¼Èë;U-ÐÞ¸Ä;I-ÐÂÔö;D-É¾³ý' ,
`remark`  varchar(1024) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`material_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci
COMMENT='´æ·ÅÎïÁÏµÄÖ÷ÁÏ£¬¸±ÁÏ£¬±³ÁÏºÍÏµÊýÐÅÏ¢'

;

-- ----------------------------
-- Records of st_material
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_material_base
-- ----------------------------
DROP TABLE IF EXISTS `st_material_base`;
CREATE TABLE `st_material_base` (
`material_base_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`material_name`  varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`material_colour`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`material_door`  double(6,2) NULL DEFAULT NULL ,
`material_mao`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`cutting_factor`  double(6,2) NULL DEFAULT NULL ,
`remark`  varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`operate_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'O-µ¼Èë;U-ÐÞ¸Ä;I-ÐÂÔö;D-É¾³ý' ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`material_base_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_material_base
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_material_detail
-- ----------------------------
DROP TABLE IF EXISTS `st_material_detail`;
CREATE TABLE `st_material_detail` (
`material_detail_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`material_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`material_type`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`material_base_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`remark`  varchar(100) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`operate_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT 'O-µ¼Èë;U-ÐÞ¸Ä;I-ÐÂÔö;D-É¾³ý' ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`material_detail_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_material_detail
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_product_order
-- ----------------------------
DROP TABLE IF EXISTS `st_product_order`;
CREATE TABLE `st_product_order` (
`order_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`product_brand`  char(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`agency_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`agency_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`order_date`  date NULL DEFAULT NULL ,
`order_status`  varchar(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`customer_order_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`customer_order_date`  date NULL DEFAULT NULL ,
`car_type_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT '¶ÔÓ¦st_car_type ±íÖÐµÄtype_code' ,
`car_type_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`style_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`carbrand_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`colour`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`amount`  int(11) NULL DEFAULT NULL ,
`material_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`embroider_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`Straight_pleated`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`templet_type`  varchar(8) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`remark`  varchar(512) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`batch_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`cutting_price`  double(16,2) NULL DEFAULT NULL ,
`sewing_price`  double(16,2) NULL DEFAULT NULL ,
`embroider_price`  double(16,2) NULL DEFAULT NULL ,
`package_price`  double(16,2) NULL DEFAULT NULL ,
`receiver_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`receiver_phone`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`receiver_address`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`receiver_postcode`  varchar(6) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`order_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_product_order
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_product_type
-- ----------------------------
DROP TABLE IF EXISTS `st_product_type`;
CREATE TABLE `st_product_type` (
`product_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`product_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`product_code`  varchar(4) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`show_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`product_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_product_type
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_role
-- ----------------------------
DROP TABLE IF EXISTS `st_role`;
CREATE TABLE `st_role` (
`role_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`role_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`role_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`role_type`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`role_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_role
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_sites_category
-- ----------------------------
DROP TABLE IF EXISTS `st_sites_category`;
CREATE TABLE `st_sites_category` (
`id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`category_code`  char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`avalid_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_sites_category
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_sites_info
-- ----------------------------
DROP TABLE IF EXISTS `st_sites_info`;
CREATE TABLE `st_sites_info` (
`id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`title`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`sites_category_code`  char(2) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`var_time`  datetime NULL DEFAULT NULL ,
`info`  text CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL ,
`avalid_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`publisher`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`file_path`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`photo_path`  varchar(256) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_sites_info
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_update_order
-- ----------------------------
DROP TABLE IF EXISTS `st_update_order`;
CREATE TABLE `st_update_order` (
`row_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`order_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`orig_order_date`  date NULL DEFAULT NULL ,
`new_order_date`  date NULL DEFAULT NULL ,
`create_date`  date NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`row_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_update_order
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_user
-- ----------------------------
DROP TABLE IF EXISTS `st_user`;
CREATE TABLE `st_user` (
`user_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`user_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`password`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`user_type`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`user_role`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`valid_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`start_date`  date NULL DEFAULT NULL ,
`end_date`  date NULL DEFAULT NULL ,
`vendor_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`user_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_user
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_user_ext
-- ----------------------------
DROP TABLE IF EXISTS `st_user_ext`;
CREATE TABLE `st_user_ext` (
`user_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`user_full_name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`email`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`birth_date`  date NULL DEFAULT NULL ,
`mobile_phone`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`qq`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`user_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_user_ext
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_vehicle_brand
-- ----------------------------
DROP TABLE IF EXISTS `st_vehicle_brand`;
CREATE TABLE `st_vehicle_brand` (
`id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`avalid_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_vehicle_brand
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_vehicle_line
-- ----------------------------
DROP TABLE IF EXISTS `st_vehicle_line`;
CREATE TABLE `st_vehicle_line` (
`id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`avalid_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vehicle_brand`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_vehicle_line
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_vehicle_model
-- ----------------------------
DROP TABLE IF EXISTS `st_vehicle_model`;
CREATE TABLE `st_vehicle_model` (
`id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`avalid_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vehicle_line`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_vehicle_model
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_vehicle_model_feature
-- ----------------------------
DROP TABLE IF EXISTS `st_vehicle_model_feature`;
CREATE TABLE `st_vehicle_model_feature` (
`id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL DEFAULT '' ,
`name`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`category_number`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_vehicle_model_feature
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for st_vendor
-- ----------------------------
DROP TABLE IF EXISTS `st_vendor`;
CREATE TABLE `st_vendor` (
`vendor_id`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`vendor_code`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_name`  varchar(64) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_full_name`  varchar(128) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_type`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_level`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_province`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_city`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_county`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`vendor_address`  varchar(512) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`legal_person`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`telephone`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`mobile_phone`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`fax_no`  varchar(16) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`production_amount`  int(11) NULL DEFAULT NULL ,
`cutting_price`  double(16,2) NULL DEFAULT NULL ,
`sewing_price`  double(16,2) NULL DEFAULT NULL ,
`embroider_price`  double(16,2) NULL DEFAULT NULL ,
`package_price`  double(16,2) NULL DEFAULT NULL ,
`big_logo_price`  double(16,2) NULL DEFAULT NULL ,
`small_logo_price`  double(16,2) NULL DEFAULT NULL ,
`security_line`  int(11) NULL DEFAULT NULL ,
`valid_flag`  char(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL COMMENT '0-Î´ÆôÓÃ;1-ÆôÓÃ' ,
`sender_name`  char(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`sender_phone`  char(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`sender_address`  char(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`sender_postcode`  char(10) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`remark`  varchar(500) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`create_date`  datetime NULL DEFAULT NULL ,
`create_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`update_date`  datetime NULL DEFAULT NULL ,
`update_user`  varchar(32) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
PRIMARY KEY (`vendor_id`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of st_vendor
-- ----------------------------
BEGIN;
COMMIT;

-- ----------------------------
-- Table structure for user
-- ----------------------------
DROP TABLE IF EXISTS `user`;
CREATE TABLE `user` (
`username`  varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`password`  varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`name`  varchar(80) CHARACTER SET latin1 COLLATE latin1_swedish_ci NULL DEFAULT NULL ,
`status`  varchar(1) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`login_failure_ct`  int(11) NULL DEFAULT NULL ,
`last_login_ts`  timestamp NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP ,
`last_login_failure_ts`  timestamp NOT NULL DEFAULT '0000-00-00 00:00:00' ,
PRIMARY KEY (`username`)
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of user
-- ----------------------------
BEGIN;
INSERT INTO `user` VALUES ('j2ee', 'j2ee', 'J2EE', 'A', '2', '2014-12-03 17:34:20', '2014-12-03 17:34:20');
COMMIT;

-- ----------------------------
-- Table structure for user_role
-- ----------------------------
DROP TABLE IF EXISTS `user_role`;
CREATE TABLE `user_role` (
`USERNAME`  varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
`ROLENAME`  varchar(25) CHARACTER SET latin1 COLLATE latin1_swedish_ci NOT NULL ,
PRIMARY KEY (`USERNAME`, `ROLENAME`),
FOREIGN KEY (`USERNAME`) REFERENCES `user` (`username`) ON DELETE RESTRICT ON UPDATE RESTRICT,
FOREIGN KEY (`ROLENAME`) REFERENCES `role` (`ROLENAME`) ON DELETE RESTRICT ON UPDATE RESTRICT,
INDEX `fk_USER_ROLE_2` (`ROLENAME`) USING BTREE 
)
ENGINE=InnoDB
DEFAULT CHARACTER SET=latin1 COLLATE=latin1_swedish_ci

;

-- ----------------------------
-- Records of user_role
-- ----------------------------
BEGIN;
INSERT INTO `user_role` VALUES ('j2ee', 'admin'), ('j2ee', 'role1');
COMMIT;
